package com.board.controller;


import com.board.dto.CanteenDto;
import com.board.service.CanteenInfoService;
import com.board.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 李杰
 * @since 2024年04月03日
 */
@RestController
@RequestMapping("/canteenInfo")
public class CanteenInfoController {
    @Autowired
    private CanteenInfoService canteenInfoService;

    //根据id查询餐厅信息
    @GetMapping("/findCanteenById")
    public Result<CanteenDto> findCanteenById(Integer canteenId){
        CanteenDto dto= canteenInfoService.findCanteenById(canteenId);
        return Result.success("查询成功",dto);
    }


}

